﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1.DesignerPatter.Interpreter
{
    class Program4
    {
        static void Main()
        {
            PlayContext pc = new PlayContext();
            pc.PlayText = "O 3 E 0.5 ";
            Expression EX = null;
            string str = "";
            while (pc.PlayText.Length > 0)
            {
                str = pc.PlayText.Substring(0, 1);
                switch (str)
                {
                    case "O":
                        EX = new Scale();
                        break;
                    case "B":
                    case "C":
                    case "D":
                    case "E":
                    case "F":
                    case "G":
                    case "A":
                    case "P":
                        EX = new Note();
                        break;
                }
                EX.Interpret(pc);
            }
            Console.Read();
        }
    }
}
